<template>
  <div class="formBox">
    <t-form label-width="100" :model="searchData">
      <t-row>
        <t-col>
          <t-form-item label="护理项目名称： " name="name">
            <t-input v-model="searchData.name" placeholder="请输入内容" />
          </t-form-item>
        </t-col>
        <t-col>
          <t-form-item label="状态： " name="status">
            <t-select v-model="searchData.status" placeholder="请输入内容">
              <t-option key="0" label="禁用" value="0" />
              <t-option key="1" label="启用" value="1" />
            </t-select>
          </t-form-item>
        </t-col>
        <t-col class="searchBtn">
          <button type="button" class="bt-grey wt-60" @click="handleReset">
            重置
          </button>
          <button type="button" class="bt wt-60" @click="handleSearch">
            搜索
          </button>
        </t-col>
      </t-row>
    </t-form>
  </div>
</template>

<script setup lang="ts">
import { handleError, ref } from 'vue'
// vue 的双向绑定---
//   const searchData =ref({
//     name:'',
//     status:0
//   })

const props = defineProps({
  searchData: {
    type: Object
  }
})

const emit = defineEmits(['handleSearch', 'handleReset'])

const handleSearch = () => {
  emit('handleSearch')
}

const handleReset = () => {
  emit('handleReset')
}
</script>
